package com.xcc.common.config;

import com.baomidou.mybatisplus.core.injector.ISqlInjector;
import com.baomidou.mybatisplus.extension.injector.LogicSqlInjector;
import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author frosty
 * @description mybatis plus 分页
 * @date 2019-11-12 12:11:47
 */

@Configuration
public class MyBatisPlusConfig {
    /*分页配置*/
    @Bean
    public PaginationInterceptor paginationInterceptor() {
        return new PaginationInterceptor();
    }


    /*逻辑删除配置*/
    @Bean
    public ISqlInjector sqlInjector(){
        return  new LogicSqlInjector();
    }
}
